<template>
<h2>组件B</h2>
  <div>{{name}} {{age}}</div>
</template>

<script setup>
import {useStore} from '../store/index.js'
import {storeToRefs} from "pinia";

const store = useStore()
const {name, age, changeAge} = storeToRefs(store)
const {incrementAge} = store
console.log('store', store, name, age)

</script>

<style scoped>

</style>